/*
    SUSAN® - Sole of Unix Save ANything

   Copyright (C) 2016-2019 Skyatlas co. ltd

   
*/

#ifndef BAREOS_STORED_DEVICE_H_
#define BAREOS_STORED_DEVICE_H_

namespace storagedaemon {

bool FirstOpenDevice(DeviceControlRecord* dcr);
bool FixupDeviceBlockWriteError(DeviceControlRecord* dcr, int retries = 4);
void SetStartVolPosition(DeviceControlRecord* dcr);
void SetNewVolumeParameters(DeviceControlRecord* dcr);
void SetNewFileParameters(DeviceControlRecord* dcr);
BootStrapRecord* PositionDeviceToFirstFile(JobControlRecord* jcr,
                                           DeviceControlRecord* dcr);
bool TryDeviceRepositioning(JobControlRecord* jcr,
                            DeviceRecord* rec,
                            DeviceControlRecord* dcr);

} /* namespace storagedaemon */

#endif  // BAREOS_STORED_DEVICE_H_
